﻿
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <link href="../../../Scripts/easyUI145/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="../../../Scripts/easyUI145/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../../Scripts/config.js"></script>
    <script type="text/javascript" src="../../../Comm/Gener.js"></script>
    <script src="DDLBar.js" type="text/javascript"></script>
    <script src="../../CCFlowEnum.js" type="text/javascript"></script>
    <script src="../../../Scripts/EasyUIUtility.js" type="text/javascript"></script>
    <script src="../../../Scripts/vue.js" type="text/javascript"></script>
    <!-- 自己的系统风格统一. -->
    <link href="../../../Style/skin/adminfont/iconfont.css" rel="stylesheet" />
    <link href="../../../Style/skin/css/Default.css" rel="stylesheet" />
    <!-- 自己的系统风格统一end -->
</head>
<body>
    <div id="App">
        <div id="bar"> </div>

        <fieldset>
            <legend>设置</legend>

            <ul>
                <li>
                    <a href="javascript:void(0)" @click="OpenNew()">设置与更改部门</a>
                </li>
                <li>仅适用于子线程节点，按照部门分组子线程上的处理人员，每个部门一个任务，如果该部门的其中有一个人处理了，就标识该部门的工作完成，可以流转到下一步。</li>
            </ul>
        </fieldset>


        <fieldset>
            <legend>已经设置的部门</legend>

            <div id="depts">
                <ul>
                    <li v-show="depts.length===0">未设置</li>
                    <template v-for="dept in depts">
                        <li v-if="dept.FK_DeptText!=undefined">{{dept.FK_DeptText}}</li>
                    </template>
                </ul>

            </div>
        </fieldset>
    </div>

    <script type="text/javascript">
        var Baseinfo = new Vue({
            el: '#App',
            data: {
                depts: [],
                deliverWay: DeliveryWay.BySetDeptAsSubthread
            },
            methods: {
                OpenNew: function () {
                    var url = "../../../Comm/RefFunc/Branches.htm?EnName=BP.WF.Template.NodeSheet&Dot2DotEnsName=BP.WF.Template.NodeDepts&Dot2DotEnName=BP.WF.Template.NodeDept&AttrOfOneInMM=FK_Node&AttrOfMInMM=FK_Dept&EnsOfM=BP.Port.Depts&DefaultGroupAttrKey=";
                    var nodeID = GetQueryString("FK_Node");
                    url += '&NodeID=' + nodeID + '&PKVal=' + nodeID;
                    url += url + '&BackBtn=' + 0;
                    OpenEasyUiDialogExtCloseFunc(url, '设置岗位', 800, 500, function () {
                        Baseinfo.depts = getDepts();
                    });
                }
            },
            created() {
                InitBar(this.deliverWay);
                this.depts = getDepts();
            }
        });
        //保存
        function Save() {
            var nodeID = GetQueryString("FK_Node");
            var node = new Entity("BP.WF.Template.NodeExt", nodeID);
            node.DeliveryWay = Baseinfo.deliverWay;
            node.Update();
        }
    </script>
</body>
</html>
